package com.example.vo;

import lombok.Data;
import java.util.List;

@Data
public class UserInfoVO {
    private Long id;
    private String username;
    private String nickname;
    private String email;
    private String phone;
    private String avatar; // 用户头像URL
    private String memberLevel; // 会员等级
    private List<String> roles;
    private List<MenuVO> menus; // 用户菜单
    private List<String> buttons; // 用户按钮权限
    
    // 获取会员等级名称
    public String getMemberLevelName() {
        if (memberLevel == null || "NORMAL".equals(memberLevel)) {
            return "普通用户";
        }
        switch (memberLevel) {
            case "VIP3":
                return "三级会员";
            case "VIP2":
                return "二级会员";
            case "VIP1":
                return "一级会员";
            default:
                return "普通用户";
        }
    }
} 